﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ReportGenerator
{
    class ReportGeneratorClient
    {
        static void Main(string[] args)
        {

            var db = new EmployeeDB();

            // Add some employees
            db.AddEmployee(new Employee("Person A", 1000));
            db.AddEmployee(new Employee("Person B", 2000));
            db.AddEmployee(new Employee("Person C", 3000));
            
            var reportGenerator = new ReportGenerator(db);

            // Create a default (name-first) report
            reportGenerator.Printer = new NameFirstPrinter();
            reportGenerator.CompileReport();

            Console.WriteLine("");
            Console.WriteLine("");

            // Create a salary-first report
            reportGenerator.Printer = new SalaryFirstPrinter();
            reportGenerator.CompileReport();
            
        }
    }
}
